home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
E-Education
/
(c)ed5.d64
/
hyphens
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2009-01-03
|
6KB
|
204 lines
1 GOTO910
2 PRINT"x[169][141][169][141]X` [234][255][169][255][133][145]L4[234]x[169]1[141][169][234][141]X`
3 [153]"xSTEPGINPUTSTOPSTEPINPUTONX` (null)(null)STEP(null)INPUTLISTLX(null)xSTEPUINPUTSTOPSTEP(null)INPUTONX`
4 PRINT"xhhh[170]h[168]hhhhhhh[152]H[138]HX`
5 [153]"hhhhhhh`
6 PRINT"[160][255][200][132][251][169][216][133][252] [241][183][138][162][160][255][200][145][251][136][208][251][230][252][202][208][246]`
7 [153]"NEWCLOSE(null)LEFT$>(null)ON(null)LET(null)(null)(null)(null)(null)(null)MID$(null)(null)`
35 IFUW=0THENSYSUU,15
40 POKEUC,0:POKEUN,0:UR$="":UI$="":IFUL=0THENUL=39
45 GETUI$:IFUI$=""THEN45
50 UA=ASC(UI$):UR=LEN(UR$):IFUA=13ANDUR>0THENPOKEUC,1:PRINT" [157]";:GOTO75
55 IFUA=20THENON-(UR=0)GOTO45:UR$=LEFT$(UR$,UR-1):PRINT"[157] [157][157]";:GOTO45
60 IFUR=ULTHEN45
65 GOSUB95:UR$=UR$+UI$:PRINTUI$;:GOTO45
75 FORUI=URTO1STEP-1:IFMID$(UR$,UI,1)=" "THENNEXT
80 UR$=LEFT$(UR$,UI):PRINT:RETURN
95 IFLEN(US$)=0THEN110
100 FORUI=1TOLEN(US$):IFUI$<>MID$(US$,UI,1)THENNEXT:UI$=""
105 RETURN
110 REM IFUA=46THENRETURN
115 IFUA=32ANDUR<>0THENRETURN
117 IFUA=45THENRETURN
120 REMIFUA>47ANDUA<58THENRETURN
125 IFUA>64ANDUA<91THENRETURN
130 REMIFUA<193ORUA>218THENUI$="":RETURN
135 IFPEEK(UT)=UU%THENUI$=CHR$(UA-128)
140 UI$="":RETURN
155 UZ=0:US$=UJ$:UG$=UK$:UT$=UL$:UP=UJ:UL=UK:PRINT"[147]";:POKEUY,6:POKEUX,6
160 POKEUT,UV%:POKE251,0:POKE252,UF:POKE253,0:POKE254,US/256:SYSUV:SYSUU,15
165 POKEU1,U1%:POKEU2,U2%:POKEU3,U3%-1:POKEU4,U4%:GOTO35
300 REM DERIVED FROM COMMODORE ONTARIO EDUCATIONAL SOFTWARE PROJECT 1983
310 REM DIRECTOR: FRANK WINTER
320 REM PROGRAM NAME: HYPHEN"
330 [143] WRITTEN BY: JO ANN COMITO & LUD BRAUN
340 [143] REVISED BY: MIKE DEMMER & D. MASON
350 [143] UPDATED BY: BILL CUMBERLAND
399 :
400 [153]"LOAD":[151]UT,UL%:[151]UY,0:[151]UX,0:[151]646,3
405 [153]"LOAD RIGHT$(null)(null)(null)(null)(null)LEN(null)RIGHT$(null)(null)(null) WAIT
412 PRINT" [201] WILL DISPLAY A WORD FOR YOU TO HYPHENATE.
414 [153]" (null)LEASE RE-TYPE IT, INSERTING HYPHENS BETWEEN THE SYLLABLES.
418 PRINT" [201]F YOU DON'T HYPHENATE THE WORD"
420 PRINT" CORRECTLY, [201]'LL GIVE YOU CLUES."
442 PRINT" [193]FTER TWO CHANCES, [201] WILL SHOW YOU"
444 PRINT" THE CORRECT HYPHENATION OF THE WORD."
446 PRINT" [212]HERE WILL BE TEN QUESTIONS.
448 [141]830:[142]
499 :
500 [143] <YES> SOUND
505 SS[178]54272:[129]EE[178]SS[164]SS[170]28:[151]EE,0:[130]
510 [151]54296,15:[151]54277,42:[151]54278,250
515 [151]54276,23:[151]54273,23:[151]54272,191
520 [129]T[178]1[164]100:[130]:[151]54276,32:[129]T[178]1[164]200:[130]
525 [151]54296,0:[142]
530 [143] <NO> SOUND
535 SS[178]54272:[129]EE[178]SS[164]SS[170]28:[151]EE,0:[130]
540 [151]54296,15:[151]54277,18:[151]54278,242
545 [151]54276,33:[151]54273,4:[151]54272,48
550 [129]T[178]1[164]300:[130]:[151]54276,32:[129]T[178]1[164]400:[130]
555 [151]54296,0:[142]
560 [143] <BLIP> SOUND
565 SS[178]54272:[129]EE[178]SS[164]SS[170]28:[151]EE,0:[130]
570 [151]54296,8:[151]54277,42:[151]54278,250
575 [151]54276,23:[151]54273,23:[151]54272,191
580 [129]T[178]1[164]30:[130]:[151]54276,32:[129]T[178]1[164]50:[130]
585 [151]54296,0:[142]
590 [129]T[178]1[164]500:[130]:[142]
591 [129]T[178]1[164]1000:[130]:[142]
592 [129]T[178]1[164]2000:[130]:[142]
593 [129]T[178]1[164]3000:[130]:[142]
594 [129]T[178]1[164]4000:[130]:[142]
595 [129]T[178]1[164]5000:[130]:[142]
596 [129]T[178]1[164]6000:[130]:[142]
599 :
800 [153]"LOAD";:[151]UT,UU%:[151]UY,0:[151]UX,0:[151]646,7
801 [153]" A TPUG EDUCATIONAL PROGRAM ":[141]591:[141]560
802 [153]" WAIT";
803 [153]" WAIT";
804 [153]" THE HYPHEN WAIT";
805 [153]" WAIT";
806 [153]" MODULE 1 WAIT";
807 [153]" WAIT";
808 [153]" WAIT":[141]591:[141]560
809 [153]" INSTRUCTIONS? Y/N
810 GETR$:IFR$<>"Y"ANDR$<>"N"THEN810
811 IFR$="Y"THENGOSUB400
812 PRINT"[147] .. AND AWAY WE GO!":GOSUB591:GOSUB500:GOSUB590
813 GOTO1000
830 GOSUB592:GOSUB560
835 POKEUN,0:PRINTLEFT$(UD$,24);"[153] [208]RESS [211][208][193][195][197] [194][193][210] TO CONTINUE [146][155]"
840 GETUI$:IFUI$<>" "THEN840
845 RETURN
850 UP=UP+1:PRINT"[147]"LEFT$(UT$+UP$,21);RIGHT$(UP$+UG$+STR$(UP),18)
855 PRINT" --------------------------------------"
860 IFUH=0THENPRINTLEFT$(UD$,24);LEFT$(UP$,7);"[193]NSWER, THEN PRESS [210][197][212][213][210][206] [146]"
865 UH=0:PRINT"":RETURN
875 PRINTLEFT$(UD$,24);" [207]NE MOMENT PLEASE... ":RETURN
900 US=1024:U1=209:U2=210:U3=211:U4=214:UC=204:UB=2048:UX=53280:UD=2064
902 UT=53272:UU%=21:UL%=23:UP%=2151:UN=198:UY=53281:UU=2199:UE=2087
904 UC$=CHR$(155):UV=1214:UF=196:UV=2238
905 UD$="":UP$=" "
909 RETURN
910 GOSUB900:PRINT"[147] "
970 GOTO 800
1000 PRINT"[147]"UC$;:RESTORE:POKEUY,6:POKEUX,6
1010 CLR:GOSUB900
1020 D$=""
1030 R$=""
1050 POKEUT,UL%:UP=0:GOSUB875
1170 UP=0
1200 DIM H$(100)
1210 NW=1
1220 READWR$
1230 IFWR$="END"THEN1241
1235 H$(NW)=WR$
1240 NW=NW+1:GOTO1220
1241 REM
1360 ZZ=0
1370 REM**CHOOSE A NEW WORD**
1380 ZZ=ZZ+1:IFZZ>NW-1THEN2080
1390 R=INT(NW*RND(TI)+1):IFH$(R)=""THEN1390
1400 H$=H$(R)
1410 H=LEN(H$)
1420 MISTAKE =0
1430 W$=""
1440 S$=""
1450 P$=""+LEFT$(D$,3)+LEFT$(R$,3)
1460 REM**STRIP OUT HYPHENS**
1470 FOR I=1 TO H
1480 CHAR$=MID$(H$,I,1)
1490 IF CHAR$="-" THEN 1510
1500 W$=W$+CHAR$
1510 NEXT I
1520 HYPHENS=LEN(H$)-LEN(W$)
1530 REM**PRESENT WORD TO STUDENT**
1531 REM
1532 UT$=" [200]YPHEN":UG$="[209]UESTION":GOTO1550
1540 GOSUB835
1550 GOSUB850:PRINT P$;" [208]LEASE HYPHENATE THIS WORD:":GOSUB560
1555 PRINT:PRINTTAB(4);"";W$;"[146]"
1560 PRINT" [197]NTER: ";
1561 US$="":UL=20:GOSUB35:S$=UR$
1570 S1$=""
1580 E=0
1590 S=LEN(S$)
1600 FOR I=1 TO S
1610 CHAR$=MID$(S$,I,1)
1620 IFCHAR$="-" THEN 1640
1630 S1$=S1$+CHAR$
1640 NEXT I
1650 IFS1$=W$ THEN 1680
1660 PRINT"[150] [217]OU MISSPELLED ";W$;"[146].[155]":PRINT" [208]LEASE TRY AGAIN.":GOSUB530
1670 GOTO 1540
1680 REM**CHECK HYPHENATION**
1690 S=LEN(S$):K=H
1700 IF S>H THEN K=S
1710 FOR I=1 TO K
1720 IF MID$(H$,I,1)="-" THEN 1750
1730 IF MID$(S$,I,1)<>"-" THEN 1770
1740 E=1
1750 IF MID$(S$,I,1)="-" THEN 1770
1760 E=1
1770 NEXT I
1780 REM**MESSAGES**
1785 IFE=0THENGOSUB500:PRINT"[158] [195][207][210][210][197][195][212]!! [146][155]"
1790 H$(R)=""
1795 IFE=0THENGOSUB592:GOTO2040
1800 MISTAKE=MISTAKE+1
1805 GOSUB530
1810 IF MISTAKE>1 THEN 1910
1820 IF H=S THEN 1870
1830 IF H>S THEN PRINT"[150] [217]OU HAVE TOO [198][197][215] HYPHENS. [212]RY AGAIN.[155]":GOTO 1850
1840 PRINT" [217]OU HAVE TOO [205][193][206][217] HYPHENS. [212]RY AGAIN."
1850 PRINT" "
1860 GOTO 1540
1870 PRINT:PRINT" [217]OU HAVE THE RIGHT NUMBER OF HYPHENS,"
1880 PRINT" BUT AT LEAST [207][206][197] IS IN THE WRONG PLACE."
1890 PRINT""
1900 PRINT:GOTO 1850
1910 REM**PRINT CORRECT HYPHENATION
1920 PRINT"[158] [212]HE CORRECT HYPHENATION OF"
1930 PRINT" ";W$;"[146]";" IS:"
1950 PRINT:PRINT" ";H$;"
1955 [141]560:[141]596:[141]560:[137]2040
1960 [131]"HY-PHEN","TE-LE-PHONE","PA-PER","EL-E-PHANT","SE-REN-DI-PI-TY"
1962 [131]"AC-CEL-ER-A-TION","DIS-AP-POINT-MENT","DE-CON-TA-MIN-A-TION"
1964 [131]"THOUGHT","RAD-I-CAL","XY-LO-PHONE","DA-TA","RAN-DOM-IZE","END"
2020 [141]835:[143] SPACE BAR WAIT
2030 [142]
2040 [143]**ASK WHETHER TO CONTINUE**
2045 [153]" (null)OW, TRY THE NEXT WORD.
2050 O=O+1:IFO=10THEN2060
2055 GOSUB592:GOTO1370
2060 PRINT"[147]":POKE53280,0:POKE53281,0:POKE646,1
2065 PRINT" [212]HANKS FOR PLAYING WITH ME.":GOSUB591
2070 PRINT" [196]O YOU WISH TO REPEAT THIS PROGRAM?":GOSUB590:GOSUB560
2075 GETR$:IFR$<>"Y"ANDR$<>"N"THEN2075
2080 IFR$="Y"THENRESTORE:GOTO800
2084 PRINT"[147] [210]ETURNING TO THE DISK [205][197][206][213]
2086 [147]"MENU",8
2088 [138]
2090 [128]
2100 [143] WHC 90:11:29